﻿@model Romantics.Domain.Objects.PhotoAlbum
@using Romantics
@{
    var Action = ((string)ViewContext.RouteData.Values["Action"]);
    var Controller = ((string)ViewContext.RouteData.Values["Controller"]);
}
<div class="post">
    <div class="post-meta">
        <div class="row">
            <div class="post-title">
                <h2>@Html.PhotoAlbumLink(Model)</h2>
            </div>
            <!-- AddThis -->
            <div class="share-links">
                @Html.Partial("_AddThis")
            </div>
        </div>
        <div class="row">
            <div class="post-category">
                <span>Катогория:&nbsp;</span>@Html.CategoryLink(Model.Hike.Category, Controller)
            </div>
            <div class="post-category">
                <span>Регион:&nbsp;</span>@Html.RegionLink(Model.Hike.Region, Controller)
            </div>
            <!-- DISPLAY THE COMMENTS COUNT -->
            <div class="no-of-comments">
                <a href="@string.Format("{0}#disqus_thread", Model.Href(Url))" data-disqus-identifier="@string.Format("{0}", Model.Href(Url))"></a>
            </div>
        </div>
        <div class="row">
            <div class="post-category">
                <span>Поход:&nbsp;</span>@Html.HikeLink(Model.Hike)
            </div>
        </div>
        <div class="posted-date">
            @{
                if (Model.Hike.Duration > 1)
                {
                <span>С&nbsp;</span>@Model.Hike.StartDate.ToString("d")<span>&nbsp;по&nbsp;</span>@Model.Hike.EndDate.ToString("d")
                }
                else
                {
                @Model.Hike.StartDate.ToString("d")
                }
            }
        </div>
    </div>
    <div class="post-body">
        @{
            var items = Model.Items.Take(4).ToArray();
            var href = Model.Href(Url);
            foreach (var item in items)
            {
            <div class="post-album active">
                <a href="@href">
                    <img src="@item.Middle" border="0" />
                </a>
            </div>
            }
        }
    </div>
    <div class="row">
        <div class="post-foot">
            @Html.ActionLink("Просмотр", "PhotoAlbum", "PhotoAlbum", new { id = Model.ID }, new { title = "Просмотр" })
        </div>
    </div>
</div>

